using System;
using System.Collections.Generic;
using Order.Domain.Enum;

namespace Order.Api.Read.Dto.Order
{
    /// <summary>
    /// 处方订单详情DTO
    /// </summary>
    public class PrescriptionOrderDetailDto
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        public string? OrderNo { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public PrescriptionOrderStatusEnum? OrderStatus { get; set; }

        /// <summary>
        /// 订单状态名称
        /// </summary>
        public string? OrderStatusName { get; set; }

        /// <summary>
        /// 购药方式
        /// </summary>
        public MedicationPurchaseMethodEnum? PurchaseMethod { get; set; }

        /// <summary>
        /// 购药方式名称
        /// </summary>
        public string? PurchaseMethodName { get; set; }

        /// <summary>
        /// 应付金额
        /// </summary>
        public decimal? Cost { get; set; }

        /// <summary>
        /// 优惠券金额
        /// </summary>
        public decimal? CouponAmount { get; set; }

        /// <summary>
        /// 实际支付金额
        /// </summary>
        public decimal? ActualPayment { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>
        public string? PaymentMethod { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? PaymentTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 患者信息
        /// </summary>
        public PatientInfoDto? PatientInfo { get; set; }

        /// <summary>
        /// 处方信息
        /// </summary>
        public PrescriptionInfoDto? PrescriptionInfo { get; set; }
    }

    /// <summary>
    /// 患者信息DTO
    /// </summary>
    public class PatientInfoDto
    {
        /// <summary>
        /// 患者姓名
        /// </summary>
        public string? PatientName { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public string? Sex { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int? Age { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        public string? Phone { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public string? Address { get; set; }

        /// <summary>
        /// 所患疾病
        /// </summary>
        public string? Disease { get; set; }

        /// <summary>
        /// 肝功能
        /// </summary>
        public string? LiverFunction { get; set; }

        /// <summary>
        /// 肾功能
        /// </summary>
        public string? KidneyFunction { get; set; }

        /// <summary>
        /// 过敏史
        /// </summary>
        public string? AllergyHistory { get; set; }

        /// <summary>
        /// 生育计划或状态
        /// </summary>
        public string? ReproductiveStatus { get; set; }

        /// <summary>
        /// 病情描述
        /// </summary>
        public string? DiseaseDescription { get; set; }
    }

    /// <summary>
    /// 处方信息DTO
    /// </summary>
    public class PrescriptionInfoDto
    {
        /// <summary>
        /// 处方编号
        /// </summary>
        public string? PrescriptionNo { get; set; }

        /// <summary>
        /// 开单时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 处方单状态
        /// </summary>
        public PrescriptionStatusEnum? PrescriptionStatus { get; set; }

        /// <summary>
        /// 处方单状态名称
        /// </summary>
        public string? PrescriptionStatusName { get; set; }

        /// <summary>
        /// 发药状态
        /// </summary>
        public MedicationDispensingStatusEnum? DispensingStatus { get; set; }

        /// <summary>
        /// 发药状态名称
        /// </summary>
        public string? DispensingStatusName { get; set; }

        /// <summary>
        /// 医生
        /// </summary>
        public string? Doctor { get; set; }

        /// <summary>
        /// 科室
        /// </summary>
        public DeptEnum? Department { get; set; }

        /// <summary>
        /// 科室名称
        /// </summary>
        public string? DepartmentName { get; set; }

        /// <summary>
        /// 初步诊断
        /// </summary>
        public string? PrimaryDiagnosis { get; set; }

        /// <summary>
        /// 处理意见
        /// </summary>
        public string? Advice { get; set; }

        /// <summary>
        /// 药品列表
        /// </summary>
        public List<PrescriptionDrugDto>? Drugs { get; set; }
    }

    /// <summary>
    /// 处方药品DTO
    /// </summary>
    public class PrescriptionDrugDto
    {
        /// <summary>
        /// 药品名称
        /// </summary>
        public string? DrugName { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int? Quantity { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        public string? Specification { get; set; }

        /// <summary>
        /// 用法用量
        /// </summary>
        public string? Dosage { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal? UnitPrice { get; set; }

        /// <summary>
        /// 小计
        /// </summary>
        public decimal? SubTotal { get; set; }
    }
}